package com.hanserwei.community.entity.request.menu;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;

/**
 * 菜单更新请求
 */
@Schema(description = "菜单更新请求")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MenuUpdateRequest implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID，主键
     */
    @Schema(description = "菜单ID，主键", example = "1")
    @NotNull(message = "菜单ID不能为空")
    private Integer id;

    /**
     * 父级菜单ID，0表示顶级菜单
     */
    @Schema(description = "父级菜单ID，0表示顶级菜单", example = "0")
    @NotNull(message = "父级菜单ID不能为空")
    private Integer pid;

    /**
     * 菜单名称
     */
    @Schema(description = "菜单名称", example = "用户管理")
    @NotBlank(message = "菜单名称不能为空")
    private String name;

    /**
     * 菜单图标（Element UI图标名）
     */
    @Schema(description = "菜单图标（Element UI图标名）", example = "UserFilled")
    private String icon;

    /**
     * 前端路由地址
     */
    @Schema(description = "前端路由地址", example = "/user")
    private String route;

    /**
     * 菜单排序号
     */
    @Schema(description = "菜单排序号", example = "1")
    private Integer sortId;
}
